.class public Lcom/opongo/blogapp/activities/RecentPostsListActivity;
.super Lcom/opongo/blogapp/activities/AbstractPostsListActivity;
.source "RecentPostsListActivity.java"


# static fields
.field public static final DEBUG:Z

.field private static final TAG:Ljava/lang/String;


# instance fields
.field private receiver3:Landroid/content/BroadcastReceiver;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 23
    sget-boolean v0, Lcom/opongo/blogapp/AbaSettings;->DEBUG:Z

    sput-boolean v0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->DEBUG:Z

    .line 24
    const-class v0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->TAG:Ljava/lang/String;

    .line 20
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 20
    invoke-direct {p0}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;-><init>()V

    return-void
.end method

.method static synthetic access$0()Ljava/lang/String;
    .locals 1

    .prologue
    .line 24
    sget-object v0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->TAG:Ljava/lang/String;

    return-object v0
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 6
    .parameter "savedInstanceState"

    .prologue
    .line 30
    sget-boolean v0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->DEBUG:Z

    if-eqz v0, :cond_0

    .line 31
    sget-object v0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->TAG:Ljava/lang/String;

    const-string v1, "*** create ***"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 33
    :cond_0
    new-instance v2, Lcom/opongo/blogapp/manager/DatabaseManager;

    .line 34
    const-string v0, "recent_posts"

    const-string v1, "INSERT INTO recent_posts (id,title,date,content,categories,commentscount,imageurl,post_order,guid,opened,newpost,did_vote,post_author,post_price,post_rating) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);"

    .line 33
    invoke-direct {v2, p0, v0, v1}, Lcom/opongo/blogapp/manager/DatabaseManager;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    .line 36
    .local v2, dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;
    const-string v3, "SELECT * FROM recent_posts ORDER BY date DESC"

    .line 39
    .local v3, query:Ljava/lang/String;
    const/4 v4, 0x0

    const/4 v5, 0x0

    move-object v0, p0

    move-object v1, p1

    invoke-super/range {v0 .. v5}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->onCreate(Landroid/os/Bundle;Lcom/opongo/blogapp/manager/DatabaseManager;Ljava/lang/String;ILcom/opongo/blogapp/manager/APIManager;)V

    .line 41
    new-instance v0, Lcom/opongo/blogapp/activities/RecentPostsListActivity$1;

    invoke-direct {v0, p0}, Lcom/opongo/blogapp/activities/RecentPostsListActivity$1;-><init>(Lcom/opongo/blogapp/activities/RecentPostsListActivity;)V

    iput-object v0, p0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->receiver3:Landroid/content/BroadcastReceiver;

    .line 54
    iget-object v0, p0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->receiver3:Landroid/content/BroadcastReceiver;

    new-instance v1, Landroid/content/IntentFilter;

    .line 55
    const-string v4, "com.opongo.post_open_by_push"

    invoke-direct {v1, v4}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 54
    invoke-virtual {p0, v0, v1}, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 56
    return-void
.end method

.method public onDestroy()V
    .locals 1

    .prologue
    .line 60
    iget-object v0, p0, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->receiver3:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Lcom/opongo/blogapp/activities/RecentPostsListActivity;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 61
    invoke-super {p0}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->onDestroy()V

    .line 62
    return-void
.end method
